-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Make main branch buildable #664
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jbelkins
changed the title
chore: Use dynamic manifest with CRT builder
chore: Improved Package.swift generation
Nov 2, 2022
jbelkins
changed the title
chore: Improved Package.swift generation
chore: Improved Package.swift management, make Nov 2, 2022
main
buildable
jbelkins
changed the title
chore: Improved Package.swift management, make
chore: Package.swift generation, make main branch buildable
Nov 2, 2022
main
buildable…slabs/aws-sdk-swift into jbe/crt_builder_with_dynamic_manifest
jbelkins
changed the title
chore: Package.swift generation, make main branch buildable
chore: Make main branch buildable
Nov 3, 2022
epau
reviewed
Nov 4, 2022
epau
reviewed
Nov 4, 2022
epau
reviewed
Nov 4, 2022
Co-authored-by: Ed Paulosky <eeppaauu@gmail.com>
epau
approved these changes
Nov 9, 2022
…slabs/aws-sdk-swift into jbe/crt_builder_with_dynamic_manifest
ganeshnj
reviewed
Nov 9, 2022
ganeshnj
approved these changes
Nov 9, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue #
Fixes #505
Fixes #620
Description of changes
Summary
The "release"
Package.swift
may now be merged back to themain
branch following a release, because the special logic in the currentPackage.swift
that is used to adapt the manifest for development and CI use is now provided by the manifest generator script.Details
The package manifest generation script (
scripts/generatePackageSwift.swift
) has been improved to allow for generation of a manifest that is free of hard-coded paths and special logic, and that may depend uponsmithy-swift
oraws-crt-swift
referred to by published version, branch or local file path.The contents of
Package.swift
are now determined entirely by these inputs:scripts/generatePackageSwift.swift
release/
determine which AWS clients are published.versionDependencies.plist
determine the version, branch, or path where dependencies are located.AWS_SDK_RELEASE_IN_PROGRESS
(when set) generates the manifest for a release (dependencies lock to published versions only.)AWS_SDK_SWIFT_CI_DIR
,AWS_CRT_SWIFT_CI_DIR
, andSMITHY_SWIFT_CI_DIR
(when set) overrideversionDependencies.plist
and set local paths to dependencies. (This is for compatibility with the AWS CRT builder script used on our CI tasks.)No other factors affect the manifest contents, and the manifest may be regenerated any time one of these factors changes. The
Package.swift
file should no longer be edited by hand, since edits may be overwritten by the script at any time.(Note that the
codegen/Package.swift
manifest used for protocol tests is unchanged, and protocol tests still require that the project be installed at~/Projects/Amplify/SwiftSDK
to run on local.)When developing on the desktop, developers may use the "package edit mode" features of Xcode or Swift Package Manager to develop against local copies of dependencies rather than edit the
Package.swift
file.This will allow the release manifest to be merged back into
main
on each release, eliminating the currentPackage.swift
custom logic which presupposes the local file system location of the SDK and its dependencies. Once a release is merged back in, a SDK consumer will be able to use the SDK frommain
without additional steps to set it up. (As noted above, this will resolve #505 & #620.)This PR has been verified to build successfully when built by another project as a CRT builder script downstream dependency (see smithy-lang/smithy-swift#456 which builds this branch as a downstream.)
This PR has also been verified to build a release successfully ( see #667).
Specific changes:
scripts/generatePackageSwift.swift
is improved and derived from chore: Simplify CI, allow merging of releases to main #650 with support for:versionDependencies.plist
AWS_SDK_SWIFT_CI_DIR
,AWS_CRT_SWIFT_CI_DIR
, andSMITHY_SWIFT_CI_DIR
AWS_SDK_RELEASE_IN_PROGRESS
setPackage.swift
with file paths pointing to locally installed dependencies when running on CIAWS_SDK_RELEASE_IN_PROGRESS
New/existing dependencies impact assessment, if applicable
No new dependencies were added to this change.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.